package com.bjfu.intelligentrecognizeserver.service.impl;

import com.bjfu.intelligentrecognizeserver.mapper.UploadMapper;
import com.bjfu.intelligentrecognizeserver.pojo.entity.UploadImageInfo;
import com.bjfu.intelligentrecognizeserver.service.UploadService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
@Slf4j
public class UploadServiceImpl implements UploadService {
    private final UploadMapper uploadMapper;
    @Override
    public int insertImage(UploadImageInfo uploadImageInfo) {
        return uploadMapper.insertImage(uploadImageInfo);
    }

    @Override
    public List<UploadImageInfo> getUploadImageInfo(String userId) {
        return uploadMapper.selectImagePathById(userId);
    }

    @Override
    public void alterStateById(Integer id) {
        uploadMapper.alterStateById(id);
    }
}
